from idlelib import search
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver import ActionChains,Keys
import time

driver=webdriver.Edge()
driver.get('https://www.jiuxian.com/')
time.sleep(3)
search=driver.find_element(By.CSS_SELECTOR,'.search-form')
search.send_keys('茅台')
# 键盘事件 回车
search.send_keys(Keys.ENTER)
# 双击事件
search2=driver.find_element(By.ID,'wd')
ActionChains(driver).double_click(search2).perform()
time.sleep(3)
# 键盘事件
input1=driver.find_element(By.ID,'wd')
ActionChains(driver).double_click(input1).click(input1).perform()
input1.send_keys(Keys.CONTROL,'x')
